package example

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type WorkInformationRouter struct {}

// InitWorkInformationRouter 初始化 workInformation表 路由信息
func (s *WorkInformationRouter) InitWorkInformationRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	workInformationRouter := Router.Group("workInformation").Use(middleware.OperationRecord())
	workInformationRouterWithoutRecord := Router.Group("workInformation")
	workInformationRouterWithoutAuth := PublicRouter.Group("workInformation")
	{
		workInformationRouter.POST("createWorkInformation", workInformationApi.CreateWorkInformation)   // 新建workInformation表
		workInformationRouter.DELETE("deleteWorkInformation", workInformationApi.DeleteWorkInformation) // 删除workInformation表
		workInformationRouter.DELETE("deleteWorkInformationByIds", workInformationApi.DeleteWorkInformationByIds) // 批量删除workInformation表
		workInformationRouter.PUT("updateWorkInformation", workInformationApi.UpdateWorkInformation)    // 更新workInformation表
	}
	{
		workInformationRouterWithoutRecord.GET("findWorkInformation", workInformationApi.FindWorkInformation)        // 根据ID获取workInformation表
		workInformationRouterWithoutRecord.GET("getWorkInformationList", workInformationApi.GetWorkInformationList)  // 获取workInformation表列表
	}
	{
	    workInformationRouterWithoutAuth.GET("getWorkInformationPublic", workInformationApi.GetWorkInformationPublic)  // workInformation表开放接口
	}
}
